home *** CD-ROM | disk | FTP | other *** search
- /*
- * Successor.h - class definition for L-System successors.
- *
- * Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
- * University of Berne, Switzerland
- * All rights reserved.
- *
- * This software may be freely copied, modified, and redistributed
- * provided that this copyright notice is preserved on all copies.
- *
- * You may not distribute this software, in whole or in part, as part of
- * any commercial product without the express consent of the authors.
- *
- * There is no warranty or other guarantee of fitness of this software
- * for any purpose. It is provided solely "as is".
- *
- */
-
- #ifndef Successor_H
- # define Successor_H
-
- #include "list.h"
- #include "Module.h"
- #include "Name.h"
-
- //___________________________________________________________ Successor
-
- class Successor
- {
- public:
- Successor(double, ProdModuleList*);
- ~Successor();
-
- double& probability();
- ModuleList* clone();
- friend ostream& operator<<(ostream&, Successor&);
-
- private:
- double _probability;
- ProdModuleList* modules;
- };
-
- typedef Successor* SuccessorPtr;
- declareList(SuccessorList, SuccessorPtr);
-
- inline double& Successor::probability() {
- return _probability;
- }
-
- #endif // Successor_H
-